home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / uhren & terminkalender / time / xdaliclock / xdaliclock.txt < prev    next >
Text File  |  1996-04-07  |  14KB  |  348 lines

  1. NAME
  2.        xdaliclock - melting digital clock
  3.  
  4. SYNOPSIS
  5.        xdaliclock [-toolkitoption ...] [-option ...]
  6.  
  7. DESCRIPTION
  8.        The  xdaliclock  program  displays a digital clock; when a
  9.        digit changes, it ``melts'' into its new shape.
  10.  
  11.        This program was inspired by the Alto and  Macintosh  pro-
  12.        grams  of the same name, written by Steve Capps in 1983 or
  13.        1984.
  14.  
  15. OPTIONS
  16.        xdaliclock accepts all of the  standard  toolkit  options,
  17.        and also accepts the following options:
  18.  
  19.        -help   Print  a  brief  summary of the allowed options on
  20.                the standard error output.
  21.  
  22.        -12     Use a twelve hour clock.
  23.  
  24.        -24     Use a twenty-four hour clock.
  25.  
  26.        -seconds
  27.                Update every second.
  28.  
  29.        -noseconds
  30.                Update once per minute; don't display  seconds  at
  31.                all.
  32.  
  33.        -cycle  Do color-cycling.
  34.  
  35.        -nocycle
  36.                Don't do color-cycling.
  37.  
  38.        -visual visual
  39.                Specify which visual to use.  Legal values are:
  40.  
  41.                best    Use  the  visual  which  supports the most
  42.                        writable color cells; this is the default.
  43.  
  44.                default Use   the  screen's  default  visual  (the
  45.                        visual of the root window.)  This  is  not
  46.                        necessarily   the  most  colorful  visual,
  47.                        which is why it is not the default.
  48.  
  49.                class   One of StaticGray, StaticColor, TrueColor,
  50.                        GrayScale,  PseudoColor,  or  DirectColor.
  51.                        Selects the deepest visual  of  the  given
  52.                        class.
  53.  
  54.                number  A  number  (decimal or hex) is interpreted
  55.  
  56. X Version 11                15-May-94                           1
  57.  
  58.                        as a visual id number, as reported by  the
  59.                        xdpyinfo(1)  program;  in this way you can
  60.                        select a shallower visual if desired.
  61.  
  62.        -shape  Use the Shape Extension,  if  it's  available,  to
  63.                make the window background be transparent.
  64.  
  65.                This  doesn't  interact terribly well with the twm
  66.                or tvtwm window managers, unless  they  have  been
  67.                configured to not put a titlebar on the xdaliclock
  68.                window.  If this isn't specified in your .twmrc or
  69.                .tvtwmrc  file,  then the window will flicker con-
  70.                stantly, as the window manager tries  to  add  and
  71.                remove the titlebar ten times each second.
  72.  
  73.                Also,  this  turns  most X servers into huge cycle
  74.                hogs.  This is  probably  because  of  inefficient
  75.                implementations of the Shape extension.
  76.  
  77.        -noshape
  78.                Don't use the Shape Extension.
  79.  
  80.        -memory low
  81.                Use  high-bandwidth, low-memory mode.  If you have
  82.                a very fast connection between  the  machine  this
  83.                program  is running on and the X server it is dis-
  84.                playing on, then xdaliclock can work correctly  by
  85.                simply  making  the drawing requests it needs when
  86.                it needs them.  This is the elegant method.   How-
  87.                ever,  the amount of data necessary to animate the
  88.                display ends up being  a  bit  over  10  kilobytes
  89.                worth of X Protocol per second.  On a fast machine
  90.                with a local display,  or  over  a  fast  network,
  91.                that's almost negligible, but (for example) an NCD
  92.                X Terminal at 38.4 kilobaud can't keep  up.   That
  93.                is the reason for:
  94.  
  95.        -memory medium
  96.                Use  high-memory,  low-bandwidth  mode.   In  this
  97.                mode, xdaliclock precomputes most  of  the  frames
  98.                that it will ever need.  This is the sleazy copout
  99.                method.  The bandwidth  requirements  are  drasti-
  100.                cally  reduced,  because  instead  of  telling the
  101.                server what bits to draw where, it merely tells it
  102.                what  pixmaps to copy into the window.  Aside from
  103.                the fact that I consider this to be cheating,  the
  104.                only downside of this method is that those pixmaps
  105.                (about 170 of them, each the size of  one  charac-
  106.                ter)  are  consuming server-memory.  This probably
  107.                isn't a very big  deal,  unless  you're  using  an
  108.                exceptionally large font.
  109.  
  110.        -memory high
  111.                With  memory  set  to  high, the cache is twice as
  112.  
  113. X Version 11                15-May-94                           2
  114.  
  115.                large (the n -> n+2 transitions are cached as well
  116.                as  the  n  -> n+1 ones).  Even with memory set to
  117.                medium, this program can seem sluggish when  using
  118.                the  builtin  font  over a very slow connection to
  119.                the display server.
  120.  
  121.        -font fontname
  122.                Specifies the X font to use; xdaliclock  can  cor-
  123.                rectly animate any font that contains all the dig-
  124.                its plus colon and slash, and in which the letters
  125.                aren't excessively curly.
  126.  
  127.                The  xdaliclock program contains a pair of builtin
  128.                bitmapped fonts, which are larger and more attrac-
  129.                tive  than  the  standard  X  fonts.  One of these
  130.                fonts will be used if the -font  option  is  given
  131.                one of the fontnames BUILTIN or BUILTIN2.
  132.  
  133.        -builtin
  134.                This is the same as specifying -font BUILTIN.
  135.  
  136.        -builtin2
  137.                This is the same as specifying -font BUILTIN2.
  138.  
  139.        -fullscreen
  140.                Make  the  window  take up the whole screen.  When
  141.                -fullscreen is specified, the displayed time  will
  142.                wander around a little, to prevent any pixels from
  143.                being on continuously and causing  phosphor  burn-
  144.                in.
  145.  
  146.        -root   Display the clock on the root window instead of in
  147.                its own window.   This  makes  the  digits  wander
  148.                around too.
  149.  
  150.        The  following  standard  X Toolkit command line arguments
  151.        are commonly used with xdaliclock:
  152.  
  153.        -display host:dpy
  154.                This option specifies the X server to contact.
  155.  
  156.        -geometry geometry
  157.                This option specifies the prefered size and  posi-
  158.                tion of the clock window.
  159.  
  160.        -bg color
  161.                This  option  specifies  the  color to use for the
  162.                background  of  the  window.    The   default   is
  163.                ``white.''
  164.  
  165.        -fg color
  166.                This  option  specifies  the  color to use for the
  167.                foreground  of  the  window.    The   default   is
  168.                ``black.''
  169.  
  170. X Version 11                15-May-94                           3
  171.  
  172.        -bd color
  173.                This  option  specifies  the  color to use for the
  174.                border of the window.  The default is the same  as
  175.                the foreground color.
  176.  
  177.        -rv     This option indicates that reverse video should be
  178.                simulated by swapping  the  foreground  and  back-
  179.                ground colors.
  180.  
  181.        -bw number
  182.                This  option  specifies the width in pixels of the
  183.                border surrounding the window.
  184.  
  185.        -xrm resourcestring
  186.                This option specifies  a  resource  string  to  be
  187.                used.
  188.  
  189. COMMANDS
  190.        Clicking  and  holding  any mouse button in the xdaliclock
  191.        window will cause it to display the date while the  button
  192.        is held.
  193.  
  194.        Typing  ``space''  at  the  xdaliclock  window will toggle
  195.        between a twelve hour and twenty-four hour display.
  196.  
  197.        Typing ``q'' or ``C-c'' at the window quits.
  198.  
  199.        If  the  xdaliclock  window  is  iconified  or   otherwise
  200.        unmapped, it will go to sleep until it is mapped again.
  201.  
  202. X DEFAULTS
  203.        xdaliclock  understands all of the core resource names and
  204.        classes as well as:
  205.  
  206.        seconds (class Seconds)
  207.                Whether to display seconds.  If true, this is  the
  208.                same  as  the  -seconds  command line argument; if
  209.                false, this is the same as -noseconds.
  210.  
  211.        cycle (class Cycle)
  212.                Whether to do color cycling.  If true, this is the
  213.                same  as  the  -cycle  command  line  argument; if
  214.                false, this is the same as -nocycle.
  215.  
  216.        shape (class Shape)
  217.                Whether to use the Shape Extension, if  available.
  218.                If  true,  this  is the same as the -shape command
  219.                line argument; if  false,  this  is  the  same  as
  220.                -noshape.
  221.  
  222.        memory (class Memory)
  223.                This must be high, medium, or low, the same as the
  224.                -memory command-line option.
  225.  
  226. X Version 11                15-May-94                           4
  227.  
  228.        font (class Font)
  229.                The same as the -font  command  line  option:  the
  230.                font to melt.  If this is the string BUILTIN, then
  231.                the large builtin font is used.  If  this  is  the
  232.                string BUILTIN2, then the even larger builtin font
  233.                is used.  Otherwise, this must be the  name  of  a
  234.                valid X font.
  235.  
  236.        mode (class Mode)
  237.                Whether  to  display  12-hour or 24-hour time.  If
  238.                12, this is the same as the -12 command line argu-
  239.                ment; if 24, this is the same as -24.
  240.  
  241.        datemode (class DateMode)
  242.                Specifies  how  the  date should be printed when a
  243.                mouse button is held down.  This may be one of the
  244.                strings  mm/dd/yy,  dd/mm/yy,  yy/mm/dd, yy/dd/mm,
  245.                mm/yy/dd, or dd/yy/mm.  The default  is  mm/dd/yy.
  246.                If  seconds are not being displayed, then only the
  247.                first four digits will ever  be  displayed  (mm/dd
  248.                instead of mm/dd/yy, for example.)
  249.  
  250.        fullScreen (class FullScreen)
  251.                The same as the -fullscreen command-line option.
  252.  
  253.        root (class Root)
  254.                The same as the -root command-line option.
  255.  
  256.        visualID (class VisualID)
  257.                The same as the -visual command-line option.
  258.  
  259. ENVIRONMENT
  260.        DISPLAY
  261.            to get the default host and display number.
  262.  
  263.        XENVIRONMENT
  264.            to  get the name of a resource file that overrides the
  265.            global resources stored in the RESOURCE_MANAGER  prop-
  266.            erty.
  267.  
  268.        TZ  to  get  the  current time zone.  If you want to force
  269.            the clock to display some other time  zone,  set  this
  270.            variable before starting it.  For example:
  271.  
  272.                 $ TZ=GMT0 xdaliclock
  273.                 % ( setenv TZ PST8PDT ; xdaliclock )
  274.  
  275.            You  may  notice  that  the  format of the TZ variable
  276.            (which is used by the C library  ctime(3)  and  local-
  277.            time(3) routines) is not actually documented anywhere.
  278.            The fourth character (the digit)  is  the  only  thing
  279.            that  really  matters:  it is the offset in hours from
  280.            GMT.  The first three  characters  are  ignored.   The
  281.            last  three  characters  are  used  to  flag  daylight
  282.  
  283. X Version 11                15-May-94                           5
  284.  
  285.            savings time: their presence effectively adds 1 to the
  286.            zone offset.  (I am not making this up...)
  287.  
  288. SEE ALSO
  289.        X(1),    xrdb(1),   xlsfonts(1),   xclock(1),   dclock(1),
  290.        oclock(1), tclock(1), xscreensaver(1)
  291.  
  292. BUGS
  293.        Other system load will sometimes cause the  second-display
  294.        to  increment  by more than one second at a time, in order
  295.        to remain synchronized to the current time.
  296.  
  297.        The -memory option is disgusting and shouldn't  be  neces-
  298.        sary,  but  I'm not clever enough to eliminate it.  It has
  299.        been said that hacking  graphics  in  X  is  like  finding
  300.        sqrt(pi) with roman numerals.
  301.  
  302.        When  using a small font (less than 48x56 or so) it's pos-
  303.        sible that shipping a bitmap to the server would  be  more
  304.        efficient  than  sending a DrawSegments request (since the
  305.        endpoints are specified using 16 bits each, when all  that
  306.        we really need is 6 or 7 bits.)
  307.  
  308.        Support  for  the  Shared Memory Extension would be a good
  309.        thing.
  310.  
  311.        It should display the day of the week somewhere.
  312.  
  313.        The color cycling should be less  predictable;  it  should
  314.        vary  saturation and intensity as well, and should be more
  315.        careful that foreground and background contrast well.
  316.  
  317.        Should have a -analog mode (maybe someday...)
  318.  
  319. COPYRIGHT
  320.        Copyright (C) 1991, 1992, 1993, 1994  by  Jamie  Zawinski.
  321.        Permission to use, copy, modify, distribute, and sell this
  322.        software and its documentation for any purpose  is  hereby
  323.        granted  without  fee,  provided  that the above copyright
  324.        notice appear in all copies and that both  that  copyright
  325.        notice  and  this  permission  notice appear in supporting
  326.        documentation.  No  representations  are  made  about  the
  327.        suitability  of this software for any purpose.  It is pro-
  328.        vided "as is" without express or implied warranty.
  329.  
  330. AUTHOR
  331.        Jamie Zawinski <jwz@lucid.com>, 18-sep-91.
  332.  
  333.        Please let me know if  you  find  any  bugs  or  make  any
  334.        improvements.
  335.  
  336.        Thanks   to   Ephraim   Vishniac  <ephraim@think.com>  for
  337.        explaining the format of the bitmap resources in the  Mac-
  338.        intosh version of this, so that I could snarf them for the
  339.  
  340. X Version 11                15-May-94                           6
  341.  
  342.        -builtin fonts.
  343.  
  344.        And thanks to Steve Capps for the really great idea.
  345.  
  346. X Version 11                15-May-94                           7
  347.  
  348.